package org.lanqiao.tjut.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.lanqiao.tjut.bean.UserInfoBean;
import org.lanqiao.tjut.dao.UserInfoBeanDao;
import org.lanqiao.tjut.service.IUserLoginInfoService;
import org.springframework.stereotype.Service;
@Service("userS")
public class IUserLoginInfoServiceImpl implements IUserLoginInfoService {
	@Resource
	private UserInfoBeanDao userDao;

	@Override
	public List<UserInfoBean> selectUserInfoByNameAndPwd(UserInfoBean userB) {
		// 用户登录验证
		List<UserInfoBean> lstUserS = null;
		//调用dao层查询用户登录账号和密码
		lstUserS = userDao.selectUserInfoByNameAndPwd(userB);
		return lstUserS;
	}

	@Override
	public int insertSelective(UserInfoBean userB) {
		// 注册用户
		int i = 0;
		//调用dao层注册用户信息
		i = userDao.insertSelective(userB);
		return i;
	}

	@Override
	public List<UserInfoBean> selectAllUserInfo() {
		List<UserInfoBean> lstUserS = null;
		lstUserS = userDao.selectAllUserInfo();
		return lstUserS;
	}

}
